package cqut.gbq.qimo.mapper;

import cqut.gbq.qimo.entity.Course;
import cqut.gbq.qimo.entity.Student;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface StudentMapper {
    List<Student> findAllStudent();

    Student findOneStudentByUsernameAndPassWord(@Param("username") String username, @Param("password") String password);

    Integer insertOneStudent( String username, String password, String school, String name,String stuId);


    List<Course> getClassInfo(Integer sid);

    int joinCourse(Integer sid, Integer courseId);

    Integer dropCourse(Integer sid, Integer cid);

    Student getStuInfoById(Integer sid);

    int editStudent(Integer sid, String stuId, String school, String name);

    int editPassword(Integer sid, String password);

    List<Student> getStudentByCid(Integer cid);

    int joinCourseAssginment(Integer sid, Integer aid);

    int dropCourseAssginment(Integer sid, Integer aid);

    Integer updateTop(Integer cid, Integer sid);

    Integer updateNoTop(Integer cid, Integer sid);

    List<Course> getCourseTop(Integer sid);

    List<Course> getOtherCourseTop(Integer sid);

    Student findOneStudentByUsername(String username);
}
